<%@ page pageEncoding="utf-8"%>
<%@ include file="/common/taglibs.jsp"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />

<title><fmt:message key="planeInfoList.title"/></title>

<script src="<c:url value='/scripts/date.js'/>"></script>
<script src="<c:url value='/scripts/common.js'/>"></script>
<style type="text/css">
<!--
body {
	margin-left: 0px;
	margin-top: 0px;
	margin-right: 0px;
	margin-bottom: 0px;
}
-->
</style>
<link rel="stylesheet" type="text/css" media="all"	href="<c:url value='/styles/css.css'/>" />
</head>

<body>
<html:form action="planeInfo">
<table width="99%" border="0" cellspacing="0" cellpadding="0" align=center>
  <tr>
    <td align="left" valign="top"><table width="100%" border="0" cellspacing="0" cellpadding="0">
      <tr>
        <td height="31" class="titlebgcolor">
        <table width="189" border="0" cellspacing="0" cellpadding="0">
          <tr>
            <td width="11">&nbsp;</td>
            <td width="26"><img src="images/passenger.gif" width="21" height="22" /></td>
            <td width="152"><fmt:message key="planeInfoList.heading"/></td>
          </tr>
        </table>
        </td>
      </tr>
    </table></td>
  </tr>
    <tr>
      <td>
          <table>
                  <tr>
                       <td align="left" class="font-search" nowrap>&nbsp;<fmt:message key="planeInfoForm.planeNo"/></td>                       
                       <td><html:text property="planeNo" />  </td>
                       <td align="left" class="font-search" >&nbsp;<fmt:message key="planeInfoForm.flyDate"/></td>
                       <td><html:text property="flyDate" /><a><img src="images/date.gif" width="14" height="14" onClick="fPopCalendar(flyDate,flyDate);return false" /></a></td>
                       <td>&nbsp;</td>
                  </tr>
                  <tr>
                       <td align="left" class="font-search" nowrap>&nbsp;<fmt:message key="planeInfoForm.oriArea"/></td>
                       <td>
							<html:select property="oriArea" styleId="oriArea" styleClass="text medium">
								<html:option value="">--请选择--</html:option>
								<html:optionsCollection name="cityList" label="codeAddName" value="code"/>
							</html:select>
                       </td>
                       <td align="left" class="font-search" nowrap>&nbsp;<fmt:message key="planeInfoForm.destArea"/></td>
                       <td><!--html:text property="destArea" /-->
							<html:select property="destArea" styleId="destArea" styleClass="text medium">
								<html:option value="">--请选择--</html:option>
								<html:optionsCollection name="cityList" label="codeAddName" value="code"/>
							</html:select>
					   </td>
                       <td><html:submit value="查询"/></td>
                  </tr>
    
          </table>
      </td>
  </tr>

  <tr>
    <td align="left" valign="top"><table width="100%" border="0" cellspacing="0" cellpadding="0">
      <tr>
        <td align="left" valign="top"><table width="100%" border="0" cellspacing="0" cellpadding="0">
          <tr>
            <td height="30" align="right" background="images/list_title_bg.jpg">
	    <table width="100%" height="18" border="0" cellpadding="0" cellspacing="0">
              <tr>
                <td width="10" align="left" valign="bottom" class="black12">&nbsp;</td>
                 <td  valign="bottom" class="black12">
                     <input type="button" style="margin-right: 5px" 
                     	class="textarea"
        		onclick="location.href='<c:url value="/planeInfo.html?method=edit"/>'"
        		value="<fmt:message key="button.add"/>"/>
        	 <input type="button" style="margin-right: 5px" 
                     	class="textarea"
        		onclick="doMultiSelect('checkbox2')"
        		value="<fmt:message key="button.delete"/>"/>
          		</td>
			<td><sasis:page items="${planeInfoList}"/></td>
              </tr>
            </table></td>
            <td width="6" align="right" valign="top"><img src="images/list_title_right.jpg" width="6" height="30" /></td>
          </tr>
        </table></td>
     </tr>
      <tr>
        <td align="left" valign="top">
        <table width="100%" border="0" cellspacing="0" cellpadding="0">
          <tr>
            <td width1="98%" align="left" valign="top" class="list_area_bg">
            <table width="100%" border="0" cellspacing="0" cellpadding="0">
              <tr>
                <td width="1%" align="left" valign="top">&nbsp;</td>
                <td width="99%" align="left" valign="top"> 
                <table width="100%" border="1" cellpadding="0" cellspacing="0" class="list_bordercolor"> 
                    <tr>
                      <td class="list_title_bottom"><input type="checkbox" name="checkbox" value="checkbox" onclick='checkAll(this.checked,"checkbox2");' /></td>
                      	<td class="list_font_title">&nbsp;<fmt:message key="planeInfoForm.id"/></td>
                      <td class="list_font_title">&nbsp;<fmt:message key="planeInfoForm.planeNo"/></td>
                      <td class="list_font_title">&nbsp;<fmt:message key="planeInfoForm.flyDate"/></td>
                      <td class="list_font_title">&nbsp;<fmt:message key="planeInfoForm.flyLine"/></td>
                      <td class="list_font_title">&nbsp;<fmt:message key="planeInfoForm.oriArea"/></td>
                      <td class="list_font_title">&nbsp;<fmt:message key="planeInfoForm.destArea"/></td>
                      <td class="list_font_title">&nbsp;<fmt:message key="planeInfoForm.flyTimePlan"/></td>
                      <td class="list_font_title">&nbsp;<fmt:message key="planeInfoForm.flyTimeExpect"/></td>
                      <td class="list_font_title">&nbsp;<fmt:message key="planeInfoForm.flyTimeFact"/></td>
                      <td class="list_font_title">&nbsp;<fmt:message key="planeInfoForm.flyState"/></td>
                      <td class="list_font_title">&nbsp;<fmt:message key="planeInfoForm.memo"/></td>
                      <td class="list_font_title" width="5%">&nbsp;<fmt:message key="button.edit"/></td>		   				 
				      <td class="list_font_title" width="5%">&nbsp;<fmt:message key="button.view"/></td>		   				 
                      
                    </tr>
		<c:forEach var="results" items="${planeInfoList}" varStatus="status">
                    <tr>
                      <td><span class="list_title_bottom">
                        <input type="checkbox" name="checkbox2" value="<c:out value='${results.id}'/>" />
                      </span></td>
                      <td class="list_font_area">&nbsp;<c:out value="${results.id}"/></td>
                      <td class="list_font_area">&nbsp;<c:out value="${results.planeNo}"/></td>
                      <td class="list_font_area">&nbsp;<c:out value="${results.flyDate}"/></td>
                      <td class="list_font_area">&nbsp;<c:out value="${results.flyLine}"/></td>
                      
                      <td class="list_font_area">&nbsp;<c:out value="${results.toriArea}"/></td>
                      <td class="list_font_area">&nbsp;<c:out value="${results.tdestArea}"/></td>
                      
                      <td class="list_font_area">&nbsp;<c:out value="${results.flyTimePlan}"/></td>
                      <td class="list_font_area">&nbsp;<c:out value="${results.flyTimeExpect}"/></td>
                      <td class="list_font_area">&nbsp;<c:out value="${results.flyTimeFact}"/></td>
                      <td class="list_font_area">&nbsp;<c:out value="${results.flyState}"/></td>
                      <td class="list_font_area">&nbsp;<c:out value="${results.memo}"/></td>
				    <td class="list_font_area">
				    	<img src="./images/edit.gif" width="14" height="14" style="cursor:hand"  alt="<fmt:message key="button.edit"/>" onClick="window.location='./planeInfo.html?method=edit&id=<c:out value="${results.id}"/>'">&nbsp;
				    </td>
				    <td class="list_font_area">
				    	<img src="./images/view.gif" width="14" height="14" style="cursor:hand"  alt="<fmt:message key="button.view"/>" onClick="MM_openBrWindow('./planeInfo.html?method=view&id=<c:out value="${results.id}"/>','','width=500,height=400')">&nbsp;
				    </td>
                      
                    </tr>
		</c:forEach> 
                </table>
                </td>
              </tr>
            </table>
            </td>
            <td width="8" align="left" valign1="top" background="images/list_area_right.jpg">&nbsp;</td>
          </tr>
        </table>
        </td>
      </tr>
      <tr>
        <td align="left" valign="top"><table width="100%" border="0" cellspacing="0" cellpadding="0">
          <tr>
            <td width="4" align="left" valign="top"><img src="images/list_bottom_left.jpg" width="4" height="8" /></td>
            <td align="left" valign="top"><img src="images/list_bottom_middle.jpg" width="100%" height="8" /></td>
            <td width="6" align="right" valign="top"><img src="images/list_bottom_right.jpg" width="6" height="8" /></td>
          </tr>
        </table></td>
      </tr>
    </table></td>
  </tr>
</table>
<input type="hidden" name="ary"/>
</html:form>
</body>
<script>
//written by kellen 07-04-19
function doMultiSelect(chkName){
		var selected = new Array(); 
		var val = "";	  
		   for (var i=0;i < document.forms[0].elements.length; i++){
				var e = document.forms[0].elements[i]; 
				if (e.name==chkName){
					var chk = document.forms[0].elements[i];
					if(chk.checked){
						var bb = e.value; 
					    	selected.push(bb);
					} 
				}	 
			}	

 		if(0!=selected){
 			if(confirm("<fmt:message key="common.confirm.message"/>")){ 
	 			document.forms[0].ary.value=selected;  
				document.forms[0].method="post";
				document.forms[0].action="./planeInfo.html?method=delete";
				document.forms[0].submit();
			}else return;	  			
		}else{
			alert("<fmt:message key="common.delete.message"/>");
		}	 
	}
</script>
</html>